package com.leyou.item.controller;

import com.leyou.item.entity.MyTest;
import com.leyou.item.entity.MyTest01;
import com.leyou.item.entity.TbSpu;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("test")
public class TestController {

    @GetMapping("param")
    public MyTest getTest(MyTest test){
        return test;
    }
    @RequestMapping("json")
    public MyTest getTestJson(@RequestBody MyTest test){
        return test;
    }
    @RequestMapping("testjson01")
    public MyTest testJson01(@RequestBody MyTest test){
        return test;
    }
    @RequestMapping("testjson02")
    public MyTest01 testJson02(@RequestBody MyTest01 test){
        return test;
    }

    @RequestMapping("test")
    public TbSpu getTest(@RequestBody TbSpu spu){

        return spu;
    }
}
